import request from '@/utils/request'

// 查询巡检巡更、保洁等 执行计划列表
export function listPlan(query) {
  return request({
    url: '/module/event/plan/list',
    method: 'get',
    params: query
  })
}

// 查询巡检巡更、保洁等 执行计划详细
export function getPlan(id) {
  return request({
    url: '/module/event/plan/' + id,
    method: 'get'
  })
}

// 新增巡检巡更、保洁等 执行计划
export function newWorkUser(data) {
  return request({
    url: '/module/event/plan/newWorkUser',
    method: 'post',
    data: data
  })
}

// 删除巡检巡更、保洁等 执行人员
export function delectWorkUser(data) {
  return request({
    url: '/module/event/plan/delectWorkUser',
    method: 'post',
    data: data
  })
}

// 新增巡检巡更、保洁等 执行计划
export function addPlan(data) {
  return request({
    url: '/module/event/plan',
    method: 'post',
    data: data
  })
}

// 修改巡检巡更、保洁等 执行计划
export function updatePlan(data) {
  return request({
    url: '/module/event/plan',
    method: 'put',
    data: data
  })
}

// 删除巡检巡更、保洁等 执行计划
export function delPlan(id) {
  return request({
    url: '/module/event/plan/' + id,
    method: 'delete'
  })
}

// 删除巡检巡更、保洁等 执行计划
export function deletePlan(id) {
  return request({
    url: '/module/event/plan/delete/' + id,
    method: 'delete'
  })
}

// 导出巡检巡更、保洁等 执行计划
export function exportPlan(query) {
  return request({
    url: '/module/event/plan/export',
    method: 'get',
    params: query
  })
}

// 夜间计划处理
export function getNightPlan(id) {
  return request({
    url: '/module/event/plan/night/' + id,
    method: 'get'
  })
}

// 周计划处理
export function getWeekPlan(data) {
  return request({
    url: '/module/event/plan/week/',
    method: 'post',
    data: data
  })
}

// 14天计划处理
export function getTwoWeekPlan(id) {
  return request({
    url: '/module/event/plan/twoWeek/' + id,
    method: 'get'
  })
}
